#pragma once

#include "GeneratedFiles/ui_optionswindow.h"

#include <QtGui/QWidget>
#include <QtGui/QCloseEvent>
#include <QtCore/Qt>

/*----------------------------------------------------------------------------*/

class OptionsWindow
	:	public QWidget

/*----------------------------------------------------------------------------*/

{
	Q_OBJECT

/*----------------------------------------------------------------------------*/

public:

/*----------------------------------------------------------------------------*/

	OptionsWindow();

	~OptionsWindow();

	void ShowCentered( QWidget& _parent );

	int GetImageSizeValue();

	int GetImageContrastValue();

	float GetLineExpandFactor();

	float GetLineTopFactor();

	float GetLineBotFactor();

	float GetWordLeftFactor();

	float GetWordRightFactor();

	float GetSymbIntervalFactor();

	float GetSymbBrightFactor();

	float GetSymbWidthFactor();

	void EmitFramesShowState();

/*----------------------------------------------------------------------------*/

private:

/*----------------------------------------------------------------------------*/

	Ui::OptionsUi* m_ui;

	Qt::CheckState m_linesFramesShowed;

	Qt::CheckState m_wordsFramesShowed;

	Qt::CheckState m_symbsFramesShowed;

	int m_imageSizeValue;

	int m_imageContrValue;

	float m_lineExpandFactor;

	float m_lineTopFactor;

	float m_lineBotFactor;

	float m_wordLeftFactor;

	float m_wordRightFactor;

	float m_symbIntervalFactor;

	float m_symbBrightFactor;

	float m_symbWidthFactor;

/*----------------------------------------------------------------------------*/

	void closeEvent( QCloseEvent* _event );

/*----------------------------------------------------------------------------*/

private slots:

/*----------------------------------------------------------------------------*/

	void SaveChages();

	void DiscardChanges();

	void StoreOptionsFromGui();

/*----------------------------------------------------------------------------*/

signals:

/*----------------------------------------------------------------------------*/

	void FramesShowState( bool, bool, bool );

/*----------------------------------------------------------------------------*/

};

/*----------------------------------------------------------------------------*/
